]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Set ornament on selected item in OSK languages popup menu
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 27 Jun 2022 11:55:34 +0000 (13:55 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 27 Jun 2022 14:50:51 +0000 (16:50 +0200)
There is no hint about the currently selected language, but this exists
in the mockups. Add a dot ornament on the language that is currently
selected at the time of showing the OSK languages popup.

Since this popup is created from scratch every time it is shown, and
the popup is torn down with the OSK during replacement. This also
works for further times the languages popup is shown.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5598
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2346>

js/ui/keyboard.js

index 499bc28a90c9104db4e21986954059f18e0e6c06..c819265eb2fe2ec2fa3740eecc46d0fe28eda17e 100644 (file)
@@ -244,6 +244,9 @@ var LanguageSelectionPopup = class extends PopupMenu.PopupMenu {
                 inputSourceManager.activateInputSource(is, true);
             });
             item.can_focus = false;
+            item.setOrnament(is === inputSourceManager.currentSource
+                ? PopupMenu.Ornament.DOT
+                : PopupMenu.Ornament.NONE);
         }
 
         this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());